<template>
	<view>
		<header-safearea title="授权"></header-safearea>
		<text>不授权无法进入应用！！！</text>
		<button type="primary" @click="getUserInfo">重新授权</button>
	</view>
</template>

<script setup>
	function getUserInfo() {
		uni.getUserProfile({
			desc: "获取您的信息",
			success: resp => {
				uni.setStorageSync('userInfo', resp.userInfo)
				console.log(resp)
				// 
				uni.switchTab({
					url: '/pages/home/home'
				})
			},
			fail: error => {
				console.log(error)
			}
		})
	}
	
</script>

<style lang="scss">

</style>
